<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	// 获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量    
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<div id="sidebar">
	<ul>

		<li>
			<h2>标签</h2>
			<ul>
				<!-- 每5个标签一行 -->
				<s:iterator var="_blogTag" value="#application.blogTags" status="status">
					<s:if test="(#status.index+1)%5==1">
						<li>
					</s:if>
					<a href="blog/blogAction!getBlogsByTag?blogTagEntity.id=<s:property value='#_blogTag.id'/>"><s:property value="#_blogTag.name" /></a>&nbsp;&nbsp;
					<s:if test="(#status.index+1)%5==0">
						</li>
					</s:if>
				</s:iterator>
				<s:if test="(#application.blogTags.size+1)%5!=0">
					</li>
				</s:if>
			</ul>
		</li>

		<li>
			<h2>博文分类</h2>
			<ul>
				<s:iterator var="bt" value="#application.blogTypes">
					<li><a
						href="blog/blogAction!getBlogsByType.action?blogTypeEntity.id=<s:property value='#bt.id'/>"><s:property
								value="#bt.name" /></a></li>
				</s:iterator>
			</ul>
		</li>

		<li>
			<h2>最新博文</h2>
			<ul>
				<li><a href="#">Nec metus sed donec</a></li>
				<li><a href="#">Magna lacus bibendum mauris</a></li>
			</ul>
		</li>

	</ul>
</div>